Skip to content

fix(mcpx): skip looping symlinks in directory sources - #8418

Closed
dezren39 wants to merge 1 commit into
mainfrom
fix/7693-mcpx-eloop
Closed

dezren39 wants to merge 1 commit into
mainfrom
fix/7693-mcpx-eloop

Conversation

@dezren39

@dezren39 dezren39 commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

Summary

 symlink entry stat fails
-  abort unless target is missing
+  skip missing targets and Unix ELOOP; propagate other errors

The root cause was treating ELOOP differently from other symlinks without a usable target. Non-Unix error handling is unchanged. Closes #7693.

Evidence

  • Before: go test ./internal/source -run TestDirectorySkipsSymlinkLoops -count=1 failed for both self and pair loops with ELOOP.
  • After: go test ./internal/source/... -count=1 passed, including the permission-error test.

Merge Danger

Door: two-way

Blast Radius: mcpx directory source walks on Unix.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@dezren39
dezren39 requested a review from a team as a code owner November 11, 2026 02:04
@coderabbitai

coderabbitai Bot commented Nov 11, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 39 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 80e455a4-666c-47c5-af2f-1f519d97e0f0
Commits

Reviewing files that changed from the base of the PR and between 9b82fb9 and 36515d1.

Files selected for processing: 4

  • pkgs/mcpx/internal/source/source.go
  • pkgs/mcpx/internal/source/source_test.go
  • pkgs/mcpx/internal/source/symlink_loop_other.go
  • pkgs/mcpx/internal/source/symlink_loop_unix.go
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-11T02:06:02.085910Z 36515d1 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@dezren39 dezren39 added work/assigned Queue worker lifecycle state queue/claimed Queue worker lifecycle state status/in-progress Queue worker lifecycle state labels Nov 14, 2026
@dezren39

Copy link
Copy Markdown
Member Author

agent-note:v1
state: done
task: 17230
lane: code-b
worker: repo-worker-code
note: Closing PR #8418 as superseded in task 17230. The fix for issue #7693 already landed on main via PR #8451 (commit 6f7ff06: skip symlink loops in @dir: resolution like dangling links), and issue #7693 is CLOSED. Fresh evidence: a rebase of this branch onto current main conflicts in exactly the two files the landed fix touched (source.go already skips ELOOP like dangling links; source_test.go already carries TestDirectorySkipsSymlinkLoop covering self and pair loops), and that test passes on current main (go test ./internal/source/ -run TestDirectorySkipsSymlinkLoop -count=1, run on the laptop at fcb2144). Salvage diff posted on PR #8451: the only delta here is a platform-split isSymlinkLoop helper, functionally identical on the platforms this repo builds — nothing unique to port.

@dezren39 dezren39 removed status/in-progress Queue worker lifecycle state queue/claimed Queue worker lifecycle state work/assigned Queue worker lifecycle state labels Nov 14, 2026
@dezren39 dezren39 closed this Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mcpx(source): a symlink loop entry aborts the whole @dir: resolve — ELOOP is neither skipped like a dangling link nor pinned like a permission error

1 participant